package com.simple.util;

import java.util.List;

import com.simple.portal.bo.IRightInfoBO;
import com.simple.portal.vo.RightInfoVO;
import com.simple.util.common.SpringUtil;

public final class RightInfoLoad {
    private static final String LOCK = "lock";

    private static RightInfoLoad instance = new RightInfoLoad();

    public static RightInfoLoad getInstance() {
        synchronized(LOCK){
            if(instance == null) {
                instance = new RightInfoLoad();
            }
        }

        return instance;
    }
    
	
	public List<RightInfoVO> getAllRightInfoVOList(){
    	final IRightInfoBO rightInfoBO = (IRightInfoBO) SpringUtil.getBean("rightInfoBO");
    	return rightInfoBO.getAllRightInfoVOList();
    }
	
	
	public List<RightInfoVO> getAllByGroupIdAndRightFlag(String groupId,String rightFlag){
    	final IRightInfoBO rightInfoBO = (IRightInfoBO) SpringUtil.getBean("rightInfoBO");
    	return rightInfoBO.getAllByGroupIdAndRightFlag(groupId, rightFlag);
    }
}
